3.5.55 \(\int \frac {(A+B x) (a^2+2 a b x+b^2 x^2)^2}{x} \, dx\)

Optimal. Leaf size=66 \[ a^4 A \log (x)+4 a^3 A b x+3 a^2 A b^2 x^2+\frac {4}{3} a A b^3 x^3+\frac {B (a+b x)^5}{5 b}+\frac {1}{4} A b^4 x^4 \]

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 66, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {27, 80, 43} \begin {gather*} 3 a^2 A b^2 x^2+4 a^3 A b x+a^4 A \log (x)+\frac {4}{3} a A b^3 x^3+\frac {B (a+b x)^5}{5 b}+\frac {1}{4} A b^4 x^4 \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((A + B*x)*(a^2 + 2*a*b*x + b^2*x^2)^2)/x,x]

[Out]

4*a^3*A*b*x + 3*a^2*A*b^2*x^2 + (4*a*A*b^3*x^3)/3 + (A*b^4*x^4)/4 + (B*(a + b*x)^5)/(5*b) + a^4*A*Log[x]

Rule 27

Int[(u_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[u*Cancel[(b/2 + c*x)^(2*p)/c^p], x] /; Fr
eeQ[{a, b, c}, x] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 80

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[(b*(c + d*x)
^(n + 1)*(e + f*x)^(p + 1))/(d*f*(n + p + 2)), x] + Dist[(a*d*f*(n + p + 2) - b*(d*e*(n + 1) + c*f*(p + 1)))/(
d*f*(n + p + 2)), Int[(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n, p}, x] && NeQ[n + p + 2,
0]

Rubi steps

\begin {align*} \int \frac {(A+B x) \left (a^2+2 a b x+b^2 x^2\right )^2}{x} \, dx &=\int \frac {(a+b x)^4 (A+B x)}{x} \, dx\\ &=\frac {B (a+b x)^5}{5 b}+A \int \frac {(a+b x)^4}{x} \, dx\\ &=\frac {B (a+b x)^5}{5 b}+A \int \left (4 a^3 b+\frac {a^4}{x}+6 a^2 b^2 x+4 a b^3 x^2+b^4 x^3\right ) \, dx\\ &=4 a^3 A b x+3 a^2 A b^2 x^2+\frac {4}{3} a A b^3 x^3+\frac {1}{4} A b^4 x^4+\frac {B (a+b x)^5}{5 b}+a^4 A \log (x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 83, normalized size = 1.26 \begin {gather*} a^4 A \log (x)+a^4 B x+2 a^3 b x (2 A+B x)+a^2 b^2 x^2 (3 A+2 B x)+\frac {1}{3} a b^3 x^3 (4 A+3 B x)+\frac {1}{20} b^4 x^4 (5 A+4 B x) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((A + B*x)*(a^2 + 2*a*b*x + b^2*x^2)^2)/x,x]

[Out]

a^4*B*x + 2*a^3*b*x*(2*A + B*x) + a^2*b^2*x^2*(3*A + 2*B*x) + (a*b^3*x^3*(4*A + 3*B*x))/3 + (b^4*x^4*(5*A + 4*
B*x))/20 + a^4*A*Log[x]

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {(A+B x) \left (a^2+2 a b x+b^2 x^2\right )^2}{x} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[((A + B*x)*(a^2 + 2*a*b*x + b^2*x^2)^2)/x,x]

[Out]

IntegrateAlgebraic[((A + B*x)*(a^2 + 2*a*b*x + b^2*x^2)^2)/x, x]

________________________________________________________________________________________

fricas [A]  time = 0.40, size = 93, normalized size = 1.41 \begin {gather*} \frac {1}{5} \, B b^{4} x^{5} + A a^{4} \log \relax (x) + \frac {1}{4} \, {\left (4 \, B a b^{3} + A b^{4}\right )} x^{4} + \frac {2}{3} \, {\left (3 \, B a^{2} b^{2} + 2 \, A a b^{3}\right )} x^{3} + {\left (2 \, B a^{3} b + 3 \, A a^{2} b^{2}\right )} x^{2} + {\left (B a^{4} + 4 \, A a^{3} b\right )} x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(b^2*x^2+2*a*b*x+a^2)^2/x,x, algorithm="fricas")

[Out]

1/5*B*b^4*x^5 + A*a^4*log(x) + 1/4*(4*B*a*b^3 + A*b^4)*x^4 + 2/3*(3*B*a^2*b^2 + 2*A*a*b^3)*x^3 + (2*B*a^3*b +
3*A*a^2*b^2)*x^2 + (B*a^4 + 4*A*a^3*b)*x

________________________________________________________________________________________

giac [A]  time = 0.17, size = 94, normalized size = 1.42 \begin {gather*} \frac {1}{5} \, B b^{4} x^{5} + B a b^{3} x^{4} + \frac {1}{4} \, A b^{4} x^{4} + 2 \, B a^{2} b^{2} x^{3} + \frac {4}{3} \, A a b^{3} x^{3} + 2 \, B a^{3} b x^{2} + 3 \, A a^{2} b^{2} x^{2} + B a^{4} x + 4 \, A a^{3} b x + A a^{4} \log \left ({\left | x \right |}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(b^2*x^2+2*a*b*x+a^2)^2/x,x, algorithm="giac")

[Out]

1/5*B*b^4*x^5 + B*a*b^3*x^4 + 1/4*A*b^4*x^4 + 2*B*a^2*b^2*x^3 + 4/3*A*a*b^3*x^3 + 2*B*a^3*b*x^2 + 3*A*a^2*b^2*
x^2 + B*a^4*x + 4*A*a^3*b*x + A*a^4*log(abs(x))

________________________________________________________________________________________

maple [A]  time = 0.05, size = 94, normalized size = 1.42 \begin {gather*} \frac {B \,b^{4} x^{5}}{5}+\frac {A \,b^{4} x^{4}}{4}+B a \,b^{3} x^{4}+\frac {4 A a \,b^{3} x^{3}}{3}+2 B \,a^{2} b^{2} x^{3}+3 A \,a^{2} b^{2} x^{2}+2 B \,a^{3} b \,x^{2}+A \,a^{4} \ln \relax (x )+4 A \,a^{3} b x +B \,a^{4} x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x+A)*(b^2*x^2+2*a*b*x+a^2)^2/x,x)

[Out]

1/5*b^4*B*x^5+1/4*A*b^4*x^4+B*x^4*a*b^3+4/3*a*A*b^3*x^3+2*B*x^3*a^2*b^2+3*a^2*A*b^2*x^2+2*B*x^2*a^3*b+4*a^3*A*
b*x+B*a^4*x+A*a^4*ln(x)

________________________________________________________________________________________

maxima [A]  time = 0.49, size = 93, normalized size = 1.41 \begin {gather*} \frac {1}{5} \, B b^{4} x^{5} + A a^{4} \log \relax (x) + \frac {1}{4} \, {\left (4 \, B a b^{3} + A b^{4}\right )} x^{4} + \frac {2}{3} \, {\left (3 \, B a^{2} b^{2} + 2 \, A a b^{3}\right )} x^{3} + {\left (2 \, B a^{3} b + 3 \, A a^{2} b^{2}\right )} x^{2} + {\left (B a^{4} + 4 \, A a^{3} b\right )} x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(b^2*x^2+2*a*b*x+a^2)^2/x,x, algorithm="maxima")

[Out]

1/5*B*b^4*x^5 + A*a^4*log(x) + 1/4*(4*B*a*b^3 + A*b^4)*x^4 + 2/3*(3*B*a^2*b^2 + 2*A*a*b^3)*x^3 + (2*B*a^3*b +
3*A*a^2*b^2)*x^2 + (B*a^4 + 4*A*a^3*b)*x

________________________________________________________________________________________

mupad [B]  time = 0.04, size = 84, normalized size = 1.27 \begin {gather*} x\,\left (B\,a^4+4\,A\,b\,a^3\right )+x^4\,\left (\frac {A\,b^4}{4}+B\,a\,b^3\right )+\frac {B\,b^4\,x^5}{5}+A\,a^4\,\ln \relax (x)+a^2\,b\,x^2\,\left (3\,A\,b+2\,B\,a\right )+\frac {2\,a\,b^2\,x^3\,\left (2\,A\,b+3\,B\,a\right )}{3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((A + B*x)*(a^2 + b^2*x^2 + 2*a*b*x)^2)/x,x)

[Out]

x*(B*a^4 + 4*A*a^3*b) + x^4*((A*b^4)/4 + B*a*b^3) + (B*b^4*x^5)/5 + A*a^4*log(x) + a^2*b*x^2*(3*A*b + 2*B*a) +
 (2*a*b^2*x^3*(2*A*b + 3*B*a))/3

________________________________________________________________________________________

sympy [A]  time = 0.21, size = 95, normalized size = 1.44 \begin {gather*} A a^{4} \log {\relax (x )} + \frac {B b^{4} x^{5}}{5} + x^{4} \left (\frac {A b^{4}}{4} + B a b^{3}\right ) + x^{3} \left (\frac {4 A a b^{3}}{3} + 2 B a^{2} b^{2}\right ) + x^{2} \left (3 A a^{2} b^{2} + 2 B a^{3} b\right ) + x \left (4 A a^{3} b + B a^{4}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(b**2*x**2+2*a*b*x+a**2)**2/x,x)

[Out]

A*a**4*log(x) + B*b**4*x**5/5 + x**4*(A*b**4/4 + B*a*b**3) + x**3*(4*A*a*b**3/3 + 2*B*a**2*b**2) + x**2*(3*A*a
**2*b**2 + 2*B*a**3*b) + x*(4*A*a**3*b + B*a**4)

________________________________________________________________________________________